import styled from 'styled-components';
import imgLogo from '../../assets/nav-logo.png'

export const HeaderWrapper = styled.div`
    height: 56px;
    border-bottom: 1px solid #f0f0f0;
`

export const HeaderLimit = styled.div`
    position: relative;
    min-width: 768px;
    max-width: 1440px;
    height: 100%;
    margin: 0 auto;
`

export const HeaderLogo = styled.div`
    position: absolute;
    left: 0;
    top: 0;
    width: 100px;
    height: 100%;
    background: url(${imgLogo}) no-repeat;
    background-size: contain;
`

export const HeaderContent = styled.div`
    width: 960px;
    height: 100%;
    margin: 0 auto;
    padding-right: 30px;
    box-sizing: border-box;
`

export const HeaderBtn = styled.a.attrs({
    href: '#'
})`
    position: absolute;
    text-decoration: none;
    top: 0;
    right: 20px;
    display: inline-block;
    height: 36px;
    line-height: 36px;
    margin-top: 9px;
    padding: 0 20px;
    border-radius: 18px;
    background-color:lightseagreen;
    &.btn-reg {
      right: 130px;
      color: #ec6149;
      border: 1px solid rgba(236,97,73,.7);
      background-color: rgba(236,97,73,.05);
    }
    &.btn-write {
      font-size: 15px;
      color: #fff;
      height: 40px;
      margin-top: 8px;
      line-height: 40px;
      background-color: #ea6f5a;
    }
`

export const Nav = styled.a.attrs({
    href: '#'
})`
  display: block;
  font-size: 17px;
  line-height: 56px;
  padding: 0 20px;
  text-decoration: none;
  &.fl {
    color: #333;
    float: left;
  }
  &.fr {
    float: right;
    color: #969696;
  }
  &.first {
    color: #ea6f5a;
  }
`

export const Search = styled.input.attrs({
    placeholder: '搜索'
})`
  height: 38px;
  width: 220px;
  border-radius: 20px;
  outline-style: none;
  border: none;
  font-size: 14px;
  border: 1px solid #eee;
  background: #eee;
  padding: 0 40px 0 20px;
  box-sizing: border-box;
  color: #666;
  &.focused {
    width: 300px;
  }
  &::placeholder {
    color: #999;
    font-family: -apple-system,SF UI Text,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,WenQuanYi Micro Hei,sans-serif;
  }
  &.fade-enter {
    transition: all .5s ease;
  }
  &.fade-enter-active {
    width: 300px;
  }
  &.fade-exit {
    transition: all .5s ease;
  }
  &.fade-exit-active {
    width: 220px;
  }
`

export const SearchContainer =  styled.div`
  position: relative;
  float: left;
  margin-top: 9px;
`

export const SearchIcon = styled.div`
  &.focusedIcon {
    background-color: #ccc;
  }
  position: absolute;
  width: 38px;
  height: 30px;
  top: 0;
  right: 0;
  height: 100%;
  line-height: 38px;
  text-align: center;
  border-radius: 50%;
  cursor: pointer;
`
